<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>数据看板</title>

    <!-- Bootstrap -->
    <link href="$!{__beat.servletContext.contextPath}/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="$!{__beat.servletContext.contextPath}/css/dashboard.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<!-- 上方导航 -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar" id="tree">
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" style="height:2000px">
            <iframe id="frame_container" src="$!{__beat.servletContext.contextPath}/netflow/trend" height="100%" width="100%" frameborder="0"></iframe>
        </div>
    </div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="$!{__beat.servletContext.contextPath}/bootstrap/js/libs/jquery-1.9.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="$!{__beat.servletContext.contextPath}/bootstrap/bootstrap-treeview.min.js"></script>
<script type="text/javascript">
$('#tree').treeview({
	data: [{
		text: "流量",
		href: "$!{__beat.servletContext.contextPath}/netflow/trend",
		nodes: [{
			text: "看板",
			href: "$!{__beat.servletContext.contextPath}/netflow/trend"
		},{
			text: "看板(测试)",
			href: "$!{__beat.servletContext.contextPath}/netflow/test"
		},
		{
				text: "热词TOP30",
				href: "$!{__beat.servletContext.contextPath}/netflow/topSearchWord"
		},
		{
				text: "来源",
				href: "$!{__beat.servletContext.contextPath}/netflow/source"
		},		
		{
				text: "热门城市TOP30",
				href: "$!{__beat.servletContext.contextPath}/netflow/topNCity"
		}]
	},
	{
		text: "收入",
        href: "$!{__beat.servletContext.contextPath}/income/citycate",
        nodes: [
            {
                text: "城市类别",
                href: "$!{__beat.servletContext.contextPath}/income/citycate"
            },
            {
                text: "流量",
                href: "$!{__beat.servletContext.contextPath}/income/netflow"
            }
        ]
	},
	{
		text: "客户"
	},
	{
		text: "信息"
	},
	{
		text: "数据文档"
	}]
});
    $('#tree').on('nodeSelected', function (event, node) {
        var href= node.href;
		console.log(href);
        if(href){
            $('#frame_container').attr('src',href);
        }
    });
</script>
</body>
</html>
